package com.iqiyi.pps.epg.api.server.iservice;

import com.iqiyi.mams.hedvig.http.mediatype.ExtendedMediaType;

import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * Created by karkarrotxu on 2016/9/19.
 */
@Path("/carousel")
@Produces({ExtendedMediaType.APPLICATION_X_THRIFT})
public interface CarouselApiService {
    @POST
    @Path("/create")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselCreate(@FormParam("fatherId") String fatherId,
                                 @FormParam("qipuId") String qipuId,
                                 @FormParam("showName") String showName,
                                 @FormParam("startTime") String startTime,
                                 @FormParam("itemTime") String itemTime,
                                 @FormParam("startNum") String startNum,
                                 @FormParam("followNum") String followNum,
                                 @FormParam("totalNum") String totalNum,
                                 @FormParam("repeatedStatus") String repeatedStatus,
                                 @FormParam("followedStatus") String followedStatus,
                                 @FormParam("channelTag") String channelTag,
                                 @FormParam("copyrightEndTime") String copyrightEndTime,
                                 @FormParam("bossStatus") String bossStatus,
                                 @FormParam("publishStatus") String publishStatus,
                                 @FormParam("createDays") String createDays,
                                 @FormParam("createStartTime") String createStartTime,
                                 @FormParam("pageUrl") String pageUrl,
                                 @FormParam("actualNum") String actualNum);

    @POST
    @Path("/del")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselDel(@FormParam("ids") String ids, @FormParam("fatherId") String fatherId);

    @POST
    @Path("/get")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselGet(@FormParam("fatherId") String fatherId,
                              @FormParam("pageNo") Integer pageNo,
                              @FormParam("pageSize") Integer pageSize
    );

    @GET
    @Path("/automations")
    @Produces(MediaType.APPLICATION_JSON)
    public String getCarouselAutomationList(
            @QueryParam("channelId") long channelId,
            @QueryParam("pageNo") Integer pageNo,
            @QueryParam("pageSize") Integer pageSize
    );

    @POST
    @Path("/automation/indexMove")
    @Produces(MediaType.APPLICATION_JSON)
    public String moveAutomationIndex(@FormParam("id") long id,
                                      @FormParam("aimId") long aimId,
                                      @FormParam("channelId") long channelId);

    @POST
    @Path("/automation/del")
    @Produces(MediaType.APPLICATION_JSON)
    public String delCarouselAutomation(@FormParam("ids") String ids, @FormParam("channelId") long channelId);

    @POST
    @Path("/automation/add")
    @Produces(MediaType.APPLICATION_JSON)
    public String addCarouselAutomation(@FormParam("data") String data);

    @GET
    @Path("/automation/changeStatus")
    @Produces(MediaType.APPLICATION_JSON)
    public String changeStatusCarouselAutomation(@QueryParam("channelId") long channelId, @QueryParam("execStatus") int execStatus);

    @POST
    @Path("/carouselEpisode/batchAdd")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselEpisodeBatchAdd(@FormParam("data") String dataString, @FormParam("fatherId") String fatherId);

    @POST
    @Path("/carouselEpisode/batchDel")
    @Produces(MediaType.APPLICATION_JSON)
    public String carouselEpisodeBatchDel(@FormParam("ids") String ids, @FormParam("channelId") String channelId);

    @POST
    @Path("/carouselEpisode/indexMove")
    @Produces(MediaType.APPLICATION_JSON)
    public String moveCarouselEpisodeIndex(@FormParam("id") long id, @FormParam("aimId") long aimId, @FormParam("channelId") long channelId);

    @GET
    @Path("/carouselEpisode/list")
    @Produces(MediaType.APPLICATION_JSON)
    public String getCarouselEpisodeList(@QueryParam("channelId") long channelId, @QueryParam("pageNo") Integer pageNo, @QueryParam("pageSize") Integer pageSize);

    @POST
    @Path("/automation/indexMove/byIndex")
    @Produces(MediaType.APPLICATION_JSON)
    public String moveAutomationIndexByIndex(@FormParam("id") long id,  @FormParam("aimIdx") int aimIdx, @FormParam("channelId") long channelId);

    @POST
    @Path("/carouselEpisode/indexMove/byIndex")
    @Produces(MediaType.APPLICATION_JSON)
    public String moveCarouselEpisodeIndexByIndex(@FormParam("id") long id, @FormParam("aimIdx") int aimIdx, @FormParam("channelId") long channelId);
}
